﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using System.Security;
using NUnit.Framework;


namespace Common.Tests.Security
{
    [TestFixture]
    public class SecureStringExtensionTests
    {
        [Test]
        public void Encrypt_Decrypt()
        {

            SecureString str = new SecureString();
            const string STR_HelloTest = "Hello test!!!";
            str.Append(STR_HelloTest);

            str.MakeReadOnly();

            string result = str.Decode();
            Assert.AreEqual(STR_HelloTest, result);
        }
    }
}
